% This file creates and saves Figure 8b in 
% Replication_files\Figures\Figure_8b.eps
clear

cd ../mat_files

load fig8b_irfs_w_inertia_rev.mat

y_u_i=y_u;
c_u_i=c_u;
dy_u_i=dy_u;
q_u_i=q_u;
mu_u_i=mu_u;
g_u_i=g_u;

load fig8b_irfs_wo_inertia_rev.mat

fig8b=figure;

%output response

irf_y=subplot(2,3,1);
hold on
plot(1:20,y_u_i,'k','LineWidth',1);
plot(1:20,y_u,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
title(irf_y,'\fontsize{10}Output (Y)','fontweight','normal');
box(irf_y,'on');

%consumption response

irf_c=subplot(2,3,2);
hold on
plot(1:20,c_u_i,'k','LineWidth',1);
plot(1:20,c_u,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
title(irf_c,'\fontsize{10}Consumption (C)','fontweight','normal')
box(irf_c,'on');

%government spending response

irf_g=subplot(2,3,3);
hold on
plot(1:20,g_u_i,'k','LineWidth',1);
plot(1:20,g_u,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
ylim([0 1.2]);
title(irf_g,'\fontsize{10}Government Spending (g)','fontweight','normal')
box(irf_g,'on');

%output growth response

irf_dy=subplot(2,3,4);
hold on
plot(1:20,dy_u_i,'k','LineWidth',1);
plot(1:20,dy_u,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
ylim([-0.01 0.05]);
title(irf_dy,'\fontsize{10}Output Growth (\DeltaY)','fontweight','normal')
box(irf_dy,'on');

%discount rate response

irf_q=subplot(2,3,5);
hold on
plot(1:20,q_u_i,'k','LineWidth',1);
plot(1:20,q_u,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
ylim([-0.01 0.05]);
title(irf_q,'\fontsize{10}Discount Rate (q)','fontweight','normal')
box(irf_q,'on');

%markup response

irf_mu=subplot(2,3,6);
hold on
plot(1:20,mu_u_i,'k','LineWidth',1);
plot(1:20,mu_u,'-.k','LineWidth',1);
plot(1:20,zeros(1,20),'r','LineWidth',0.5);
xlim([1 20]);
title(irf_mu,'\fontsize{10}Markup (\mu)','fontweight','normal')
box(irf_mu,'on');

fig8b.PaperUnits='inches';
fig8b.PaperPosition=[0 0 7.5 3];

cd ../Figures
print('Figure_8b','-depsc','-tiff')
cd ../m_files

clear
